package com.factory.code.service;


import com.factory.code.controller.param.ConnectionParam;
import com.factory.code.controller.param.TableNameParam;
import com.factory.code.controller.vo.R;
import com.factory.code.lib.database.model.DatebaseTypeAndDriverModel;
import com.factory.code.lib.database.model.TableColumnModel;
import com.factory.code.lib.database.model.TableInfoModel;

import java.util.List;

public interface DatabaseService {
    /**
     * test jdbc connection
     *
     * @param connectionParam parameters
     * @return
     */
    boolean testConnection(ConnectionParam connectionParam);

    List<String> listTableName(Integer projectId);

    List<TableInfoModel> getTableAll(Integer projectId);

    List<TableColumnModel> listFieldModel(TableNameParam param);

    List<DatebaseTypeAndDriverModel> listValidDbType();
}
